<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%   String path = request.getContextPath();   
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";  
	String bpath = request.getScheme()+"://"+request.getServerName();
%>
<!DOCTYPE html>
<html lang="en">
 <head>
 <meta charset="utf-8">
 <meta name="viewport" content="width=device-width, initial-scale=1.0,,user-scalable=no">
 <meta name="description" content="">
 <meta name="author" content="">
 <link rel="icon" href="http://v3.bootcss.com/favicon.ico">
<title>新增新闻</title>
 <link href="/bootstrapDemo/bootstrap/css/bootstrap.css" rel="stylesheet">
 <link href="/bootstrapDemo/bootstrap/css/bootstrap-theme.min.css" rel="stylesheet">
 <script src="/bootstrapDemo/js/jquery.js"></script>
<script src="/bootstrapDemo/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" charset="utf-8" src="/KE/build/kindeditor.js"></script>
  <script type="text/javascript">
    KE.show({
        id : 'content6',
        cssPath : '/KE/css/index.css'
    });
    

	function toSubmit(){
		var sTitle = document.getElementById("STitle").value;
		if(sTitle==null || sTitle=="" || sTitle=="undefined"){
			alert("请输入标题！");
			return;
		}else{
			document.getElementById("newsadd").submit();
		}
	}
  </script>
</head>
<body>
<ol class="breadcrumb">
  <li><a href="#">新闻管理</a></li>
  <li class="active">新闻增加</li>
</ol>
<center>
	<div class="panel-body" style="width: 95%;">
	<form id="newsadd"  name = "newsadd" action="/news/saveNews.action" method="post">
	  <table class="table">
	 	 <tr style="background-color: white;border: 0">
				<td width="10%">新闻标题</td>		
				<td >
				<input type="text" name="news.STitle"  class="form-control" id="STitle" placeholder="请填写新闻标题">
				</td>		
		</tr>
		<tr style="background-color: white;border: 0">
			<td >新闻内容</td>		
			<td >
				 <textarea id="content6" name="news.SContent" style="width:100%;height:300px;"></textarea>
			</td>		
		</tr>
	  </table>
	  <button type="button" class="btn btn-primary" onclick="toSubmit()" >提交</button>
	  <button  type="button" class="btn btn-primary"  onclick="resetForm();">重置</button>
	  </form>
	</div>
</center>

</body>
</html>